﻿namespace iMarkdown.Blocks;

public class OrderlyBlock : Block
{
    public List<ItemBlock> Blocks { get; } = [];
    public override string ToHtml()
    {
        return $"<ol>{string.Join("", Blocks.Select(x => x.ToHtml()))}</ol>";
    }
}

public class ItemBlock : Block
{
    public override string ToHtml()
    {
        return $"<li>{Context}</li>";
    }
}